Fixed author name not showing up.
This commit is contained in:
parent
3c7156c264
commit
5095934931
|
@ -24,6 +24,7 @@ void MainWindow::loadFromRecipe(Recipe recipe){
|
||||||
setAuthorName("Click 'New' to get started.");
|
setAuthorName("Click 'New' to get started.");
|
||||||
} else {
|
} else {
|
||||||
setRecipeName(recipe.getName());
|
setRecipeName(recipe.getName());
|
||||||
|
setAuthorName(recipe.getAuthor());
|
||||||
setInstruction(recipe.getInstruction());
|
setInstruction(recipe.getInstruction());
|
||||||
setIngredients(recipe.getIngredients());
|
setIngredients(recipe.getIngredients());
|
||||||
if (recipe.getImage().isNull()){
|
if (recipe.getImage().isNull()){
|
||||||
|
@ -72,7 +73,11 @@ void MainWindow::setTags(vector<RecipeTag> tags){
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setAuthorName(string name){
|
void MainWindow::setAuthorName(string name){
|
||||||
ui->authorLabel->setText(QString::fromStdString(name));
|
if (name.empty()){
|
||||||
|
ui->authorLabel->setText("");
|
||||||
|
} else {
|
||||||
|
ui->authorLabel->setText(QString::fromStdString("By "+name));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_newButton_clicked(){
|
void MainWindow::on_newButton_clicked(){
|
||||||
|
|
|
@ -373,7 +373,7 @@ font: "Noto Sans CJK KR";</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>20</pointsize>
|
<pointsize>16</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
Loading…
Reference in New Issue