Skip to content

Commit

Permalink
fix #14412
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 12, 2024
1 parent d88afdc commit 3e3806f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/netedit/GNEViewNetHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,7 @@ GNEViewNetHelper::IntervalBar::buildIntervalBarElements() {
genericDataLabel->create();
// create combo box for generic datas
myGenericDataTypesComboBox = new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
GUIDesignComboBoxNCol, false, GUIDesignComboBoxVisibleItemsMedium, myViewNet,
GUIDesignComboBoxNCol, false, GUIDesignComboBoxVisibleItemsFixed, myViewNet,
MID_GNE_INTERVALBAR_GENERICDATATYPE, GUIDesignComboBoxWidth180);
myGenericDataTypesComboBox->create();
// fill combo box
Expand All @@ -3032,7 +3032,7 @@ GNEViewNetHelper::IntervalBar::buildIntervalBarElements() {
dataSetLabel->create();
// create combo box for sets
myDataSetsComboBox = new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
GUIDesignComboBoxNCol, false, GUIDesignComboBoxVisibleItemsMedium,
GUIDesignComboBoxNCol, false, GUIDesignComboBoxVisibleItemsFixed,
myViewNet, MID_GNE_INTERVALBAR_DATASET, GUIDesignComboBoxWidth180);
myDataSetsComboBox->create();
// create checkbutton for myLimitByInterval
Expand All @@ -3053,7 +3053,7 @@ GNEViewNetHelper::IntervalBar::buildIntervalBarElements() {
parameterLabel->create();
// create combo box for attributes
myParametersComboBox = new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
GUIDesignComboBoxNCol, false, GUIDesignComboBoxVisibleItemsMedium,
GUIDesignComboBoxNCol, false, GUIDesignComboBoxVisibleItemsFixed,
myViewNet, MID_GNE_INTERVALBAR_PARAMETER, GUIDesignComboBoxWidth180);
myParametersComboBox->create();
// always recalc after creating new elements
Expand Down
9 changes: 6 additions & 3 deletions src/utils/gui/div/GUIDesigns.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ class MFXMenuCheckIcon;
/// @name ComboBox sizes
/// @{
/// @brief combo box size small
#define GUIDesignComboBoxVisibleItemsSmall 15
#define GUIDesignComboBoxVisibleItemsSmall ((int)getApp()->reg().readIntEntry("SETTINGS", "comboRows", 32))


/// @brief combo box medium small
#define GUIDesignComboBoxVisibleItemsMedium 15
#define GUIDesignComboBoxVisibleItemsMedium GUIDesignComboBoxVisibleItemsSmall

/// @brief combo box large small
#define GUIDesignComboBoxVisibleItemsLarge 15
#define GUIDesignComboBoxVisibleItemsLarge GUIDesignComboBoxVisibleItemsSmall

#define GUIDesignComboBoxVisibleItemsFixed 15

/// @}

Expand Down
7 changes: 6 additions & 1 deletion src/utils/gui/windows/GUIDialog_ViewSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ GUIDialog_ViewSettings::setCurrent(GUIVisualizationSettings* settings) {

long
GUIDialog_ViewSettings::onCmdOk(FXObject*, FXSelector, void*) {
getApp()->reg().writeIntEntry("SETTINGS", "comboRows", (int)myComboRows->getValue());
hide();
return 1;
}
Expand Down Expand Up @@ -1676,7 +1677,7 @@ GUIDialog_ViewSettings::SizePanel::onCmdSizeChange(FXObject* obj, FXSelector sel
void
GUIDialog_ViewSettings::buildHeader(FXVerticalFrame* contentFrame) {
FXHorizontalFrame* horizontalFrame = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame1);
mySchemeName = new MFXComboBoxIcon(horizontalFrame, 20, true, GUIDesignComboBoxVisibleItemsSmall,
mySchemeName = new MFXComboBoxIcon(horizontalFrame, 20, true, GUIDesignComboBoxVisibleItemsMedium,
this, MID_SIMPLE_VIEW_NAMECHANGE, GUIDesignViewSettingsComboBox1);
for (const auto& name : gSchemeStorage.getNames()) {
const int index = mySchemeName->appendIconItem(name.c_str());
Expand Down Expand Up @@ -2306,6 +2307,10 @@ GUIDialog_ViewSettings::buildOpenGLFrame(FXTabBook* tabbook) {
FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);

FXMatrix* m81 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
new FXLabel(m81, TL("Combobox max rows"), nullptr, GUIDesignViewSettingsLabel1);
myComboRows = new FXRealSpinner(m81, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
myComboRows->setValue(GUIDesignComboBoxVisibleItemsLarge);
FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
myDither = new FXCheckButton(m82, TL("Dither"), this, MID_SIMPLE_VIEW_COLORCHANGE);
myDither->setCheck(mySettings->dither);
Expand Down
1 change: 1 addition & 0 deletions src/utils/gui/windows/GUIDialog_ViewSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ class GUIDialog_ViewSettings : public FXDialogBox, public GUIPersistentWindowPos
FXCheckButton* myForceDrawForRectangleSelection = nullptr;
FXCheckButton* myDisableDottedContours = nullptr;
FXButton* myRecalculateBoundaries = nullptr;
FXRealSpinner* myComboRows = nullptr;

/// @brief name panels
NamePanel* myEdgeNamePanel = nullptr;
Expand Down

0 comments on commit 3e3806f

Please sign in to comment.