mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 16:20:52 +01:00
QElectroTech is now able to open .titleblock files passed as arguments to the program.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1646 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -60,6 +60,26 @@ TitleBlockTemplateLocation QETTitleBlockTemplateEditor::location() const {
|
||||
return(location_);
|
||||
}
|
||||
|
||||
/**
|
||||
@return true if the provided filepath matches the currently edited template.
|
||||
@param filepath path of a title block template on the filesystem
|
||||
*/
|
||||
bool QETTitleBlockTemplateEditor::isEditing(const QString &filepath) {
|
||||
QString current_filepath;
|
||||
if (opened_from_file_) {
|
||||
current_filepath = filepath_;
|
||||
} else {
|
||||
current_filepath = QETApp::realPath(location_.toString());
|
||||
}
|
||||
|
||||
return(
|
||||
QET::compareCanonicalFilePaths(
|
||||
current_filepath,
|
||||
filepath
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@param true for this editor to prompt the user for a new template name as
|
||||
soon as the window appears in order to duplicate the edited one.
|
||||
|
||||
Reference in New Issue
Block a user