Ignore:
Timestamp:
2012-10-20T20:27:24+02:00 (12 years ago)
Author:
adeas31
Message:
  • Removed some old classes.
  • Better connection support for array type connectors.
  • Don't call getClassNames every time for searching of Modelica classes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/OMEdit/OMEditGUI/SearchClassDialog.cpp

    r13405 r13537  
    114114}
    115115
     116void SearchClassSuggestion::setClassesList(QStringList classes)
     117{
     118  mClassesList = classes;
     119}
    116120
    117121bool SearchClassSuggestion::eventFilter(QObject *pObject, QEvent *event)
     
    206210    return;
    207211  }
    208   MainWindow* pMainWindow = mpSearchClassBox->getSearchClassDialog()->getMainWindow();
    209212  QStringList foundedItemsList;
    210   mClassesList.clear();
    211   mClassesList = pMainWindow->getOMCProxy()->getClassNames("", "true");
    212213  foreach (QString item, mClassesList)
    213214  {
     
    336337  mpMainWindow->openLibraryTreeNode(pItem, mpDontOpenClassCheckBox->isChecked());
    337338}
     339
     340//! Checks the activation of the dialog.
     341//! Only fetch the classes from OMC once when the dialog becomes active.
     342//! @param QEvent
     343void SearchClassDialog::changeEvent(QEvent *event)
     344{
     345  if (event->type() == QEvent::ActivationChange)
     346  {
     347    if (isActiveWindow())
     348    {
     349      mpSearchClassTextBox->getSearchClassSuggestion()->getClassesList().clear();
     350      mpSearchClassTextBox->getSearchClassSuggestion()->setClassesList(getMainWindow()->getOMCProxy()->getClassNames("", "true"));
     351    }
     352  }
     353}
Note: See TracChangeset for help on using the changeset viewer.