mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-27 12:34:14 +02:00
Compare commits
4 Commits
10cc162c4e
...
b7efbdc323
| Author | SHA1 | Date | |
|---|---|---|---|
| b7efbdc323 | |||
| b00e053dab | |||
| 762bd7febf | |||
| 162d43e1c9 |
@@ -31,6 +31,7 @@
|
||||
#include <QColorDialog>
|
||||
#include <QGraphicsItem>
|
||||
#include <QPointer>
|
||||
#include <QSignalBlocker>
|
||||
|
||||
DynamicTextFieldEditor::DynamicTextFieldEditor(QETElementEditor *editor,
|
||||
PartDynamicTextField *text_field,
|
||||
@@ -143,7 +144,18 @@ void DynamicTextFieldEditor::updateForm()
|
||||
ui->m_rotation_point_center_cb->setChecked(m_text_field.data()->rotationPointCenter());
|
||||
#ifdef BUILD_WITHOUT_KF5
|
||||
#else
|
||||
m_color_kpb -> setColor(m_text_field.data() -> color());
|
||||
//Block signals while loading the colour into the button.
|
||||
//KColorButton::changed fires on a programmatic setColor() as well
|
||||
//as on user interaction, and m_color_kpb_changed() applies the new
|
||||
//colour to *every* selected part -- so merely showing the first
|
||||
//part's colour would overwrite the colour of all the others.
|
||||
//The other widgets above are immune because they are wired to
|
||||
//user-only signals (editingFinished, clicked), which setValue()
|
||||
//and setChecked() do not emit.
|
||||
{
|
||||
const QSignalBlocker blocker(m_color_kpb);
|
||||
m_color_kpb -> setColor(m_text_field.data() -> color());
|
||||
}
|
||||
#endif
|
||||
ui -> m_width_sb -> setValue(m_text_field.data() -> textWidth());
|
||||
ui -> m_font_pb -> setText(m_text_field -> font().family());
|
||||
|
||||
@@ -108,7 +108,7 @@ QString ProjectPrintWindow::docName(QETProject *project)
|
||||
{
|
||||
QString doc_name;
|
||||
if (!project->filePath().isEmpty()) {
|
||||
doc_name = QFileInfo(project->filePath()).baseName();
|
||||
doc_name = QFileInfo(project->filePath()).completeBaseName();
|
||||
} else if (!project->title().isEmpty()) {
|
||||
doc_name = project->title();
|
||||
doc_name = QET::stringToFileName(doc_name);
|
||||
|
||||
Reference in New Issue
Block a user