Moved Properties to Model menu.

This commit is contained in:
leo 2014-12-31 17:05:23 +00:00
parent e383eed986
commit 343ed3a1fd
6 changed files with 18 additions and 23 deletions

View file

@ -88,13 +88,6 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
QT_TRANSLATE_NOOP("Status", "Export the project in Wavefront OBJ format"),
QT_TRANSLATE_NOOP("Shortcut", "")
},
// LC_FILE_PROPERTIES
{
"File.Properties",
QT_TRANSLATE_NOOP("Menu", "Prope&rties..."),
QT_TRANSLATE_NOOP("Status", "Display project properties"),
QT_TRANSLATE_NOOP("Shortcut", "")
},
// LC_FILE_PRINT
{
"File.Print",
@ -1124,6 +1117,13 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
QT_TRANSLATE_NOOP("Status", "Add a new model to the project"),
QT_TRANSLATE_NOOP("Shortcut", "")
},
// LC_MODEL_PROPERTIES
{
"Model.Properties",
QT_TRANSLATE_NOOP("Menu", "Prope&rties..."),
QT_TRANSLATE_NOOP("Status", "Display the properties of the current model"),
QT_TRANSLATE_NOOP("Shortcut", "")
},
// LC_MODEL_LIST
{
"Model.List",

View file

@ -15,7 +15,6 @@ enum lcCommandId
LC_FILE_EXPORT_CSV,
LC_FILE_EXPORT_POVRAY,
LC_FILE_EXPORT_WAVEFRONT,
LC_FILE_PROPERTIES,
LC_FILE_PRINT,
LC_FILE_PRINT_PREVIEW,
LC_FILE_PRINT_BOM,
@ -171,6 +170,7 @@ enum lcCommandId
LC_PIECE_SHOW_EARLIER,
LC_PIECE_SHOW_LATER,
LC_MODEL_NEW,
LC_MODEL_PROPERTIES,
LC_MODEL_LIST,
LC_MODEL_FIRST,
LC_MODEL_01 = LC_MODEL_FIRST,

View file

@ -361,10 +361,6 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId)
lcGetActiveProject()->ExportWavefront();
break;
case LC_FILE_PROPERTIES:
lcGetActiveModel()->ShowPropertiesDialog();
break;
case LC_FILE_PRINT_PREVIEW:
TogglePrintPreview();
break;
@ -692,6 +688,10 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId)
lcGetActiveProject()->CreateNewModel();
break;
case LC_MODEL_PROPERTIES:
lcGetActiveModel()->ShowPropertiesDialog();
break;
case LC_MODEL_LIST:
lcGetActiveProject()->ShowModelListDialog();
break;

View file

@ -2605,13 +2605,7 @@ void lcModel::GetPartsList(int DefaultColorIndex, lcArray<lcPartsListEntry>& Par
}
if (UsedIdx == PartsList.GetSize())
{
lcPartsListEntry& Entry = PartsList.Add();
Entry.Info = Piece->mPieceInfo;
Entry.ColorIndex = ColorIndex;
Entry.Count = 1;
}
Piece->mPieceInfo->GetPartsList(ColorIndex, PartsList);
}
}

View file

@ -244,8 +244,6 @@ void lcQMainWindow::createMenus()
exportMenu->addAction(actions[LC_FILE_EXPORT_POVRAY]);
exportMenu->addAction(actions[LC_FILE_EXPORT_WAVEFRONT]);
menuFile->addSeparator();
menuFile->addAction(actions[LC_FILE_PROPERTIES]);
menuFile->addSeparator();
menuFile->addAction(actions[LC_FILE_PRINT]);
menuFile->addAction(actions[LC_FILE_PRINT_PREVIEW]);
// menuFile->addAction(actions[LC_FILE_PRINT_BOM]);
@ -333,11 +331,12 @@ void lcQMainWindow::createMenus()
menuPiece->addAction(actions[LC_PIECE_UNHIDE_ALL]);
menuModel = menuBar()->addMenu(tr("&Model"));
menuModel->addAction(actions[LC_MODEL_PROPERTIES]);
menuModel->addAction(actions[LC_MODEL_NEW]);
menuModel->addAction(actions[LC_MODEL_LIST]);
menuModel->addSeparator();
for (int ModelIdx = 0; ModelIdx < LC_MODEL_LAST - LC_MODEL_FIRST; ModelIdx++)
menuModel->addAction(actions[LC_MODEL_FIRST + ModelIdx]);
menuModel->addAction(actions[LC_MODEL_LIST]);
menuHelp = menuBar()->addMenu(tr("&Help"));
menuHelp->addAction(actions[LC_HELP_HOMEPAGE]);
@ -1280,7 +1279,7 @@ void lcQMainWindow::updateModels()
if (ModelIdx < Models.GetSize())
{
Action->setChecked(CurrentModel == Models[ModelIdx]);
Action->setText(Models[ModelIdx]->GetProperties().mName);
Action->setText(QString::fromLatin1("&%1 %2").arg(QString::number(ModelIdx + 1), Models[ModelIdx]->GetProperties().mName));
Action->setVisible(true);
}
else

View file

@ -23,6 +23,8 @@ lcQPropertiesDialog::lcQPropertiesDialog(QWidget *parent, void *data) :
options = (lcPropertiesDialogOptions*)data;
setWindowTitle(tr("%1 Properties").arg(options->Properties.mName));
ui->descriptionEdit->setText(options->Properties.mDescription);
ui->authorEdit->setText(options->Properties.mAuthor);
ui->commentsEdit->setText(options->Properties.mComments);